Skip to content

Fix #2804: Text Platform roundtrip (with tests) #2862

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 12, 2015

Conversation

phadej
Copy link
Collaborator

@phadej phadej commented Oct 11, 2015

No description provided.

@23Skidoo
Copy link
Member

LGTM.

@phadej
Copy link
Collaborator Author

phadej commented Oct 11, 2015

Have to fix the ambiguous parse though.

  • Most obvious change would be to not support - dash in ident.

otherwise:

  • foo-bar-quux is indeed ambiguous Platform

@phadej phadej mentioned this pull request Oct 11, 2015
@phadej
Copy link
Collaborator Author

phadej commented Oct 12, 2015

ping @23Skidoo, now this is green. AFAICS parse part of Text Platform isn't used in Cabal itself, so there shouldn't be any regressions.

@@ -193,8 +209,14 @@ buildPlatform = Platform buildArch buildOS
-- Utils:

ident :: Parse.ReadP r String
ident = Parse.munch1 (\c -> Char.isAlphaNum c || c == '_' || c == '-')
--TODO: probably should disallow starting with a number
ident = liftM2 (:) first rest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like ident is now identical to dashlessIdent. Is this intentional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, ident should have dash. Will fix shortly.

@phadej
Copy link
Collaborator Author

phadej commented Oct 12, 2015

@23Skidoo does it look ok now?

@23Skidoo
Copy link
Member

It does! Merging, thanks!

23Skidoo added a commit that referenced this pull request Oct 12, 2015
Fix #2804: Text Platform roundtrip (with tests)
@23Skidoo 23Skidoo merged commit 63a2c9c into haskell:master Oct 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants